<!--
  - createaccount.html
  - v0.01
  - 1/28/2011
  - 
  - This source code is the user interface for the create account function.
  -->
<?php
	require 'libraries/UserLibrary.php';
	session_start();
	checkSessionVariable("administrator", "AdministratorHomepage.php", NULL);
?>
<html>
	<head>
		<link rel="stylesheet" type="text/css" href="scripts/login.css" />
		<script type="text/javascript" src="scripts/createAccountValidate.js"></script>
	</head>
	<body>
		<p align="right">
			Hi, <?php echo $_SESSION["administrator"];?> | <a href="Logout.php">Log-out</a> | <a href="AdministratorHomepage.php"> Home </a>
		</p>
		<form name="login" action="ProcessCreateAccount.php" method="post" onsubmit= "return checkInput()">
			<fieldset>
				<legend>Create New Account!</legend>
				<table>
					<tr>
						<td>Username:</td>
						<td><input type="text" name="username" id="username" size="30"></td>
						<td><div id="usernameerror"></div></td>
					</tr>
					<tr>
						<td>Password:</td>
						<td><input type="password" name="password" id="password1" size="30"></td>
						<td><div id="passworderror1"></div></td>
					</tr>
					<tr>
						<td>Retype:</td>
						<td><input type="password"  id="password2" size="30"></td>
						<td><div id="passworderror2"></div></td>
					</tr>		
					<tr>
						<td>Name:</td>
						<td><input type="text" name="name" id="name" size="30"></td>
						<td><div id="nameerror"></div></td>
					</tr>
					<tr>
						<td>Title:</td>
						<td><input type="text" name="title" id="title" size="30"></td>
						<td><div id="titleerror"></div></td>
					</tr>
					<tr>
						<td>Position:</td>
						<td><input type="text" name="position" id="position" size="30"></td>
						<td><div id="positionerror"></div></td>
					</tr>
					<tr>
						<td>Select USERTYPE</td>
					</tr>
					<tr>
						<td></td>
						<td><input type="radio" name="usertype" value="ADMINISTRATOR"/>ADMINISTRATOR</td>
					</tr>
					<tr>
						<td></td>
						<td><input type="radio" name="usertype" checked value="ANALYST"/>ANALYST</td>
					</tr>
				</table>
				<input type="submit" value="Create Account"/>
	<input type="button" value="Back To Homepage" onClick='document.location.href = "AdministratorHomepage.php"'>
			</fieldset>
		</form>
	</body>
</html>